﻿using System.Data;

namespace FluentSql
{
    public interface IFluentCommandFactory
    {
        #region Public Properties

        IDalContext DeafultContext { get; }

        CommandBehavior DefaultBehavior { get; }

        CachingMode DefaultCaching { get; }

        CommandType DefaultCommandType { get; }

        IsolationLevel DefaultIsolationLevel { get; }

        bool DefaultKeepConnection { get; }

        #endregion Public Properties

        #region Public Methods

        INonQueryFluentSqlCommand NonQuery();

        IReaderFluentSqlCommand<T> Reader<T>();

        IScalarFluentSqlCommand Scalar();

        IFluentCommandFactory SetCachingMode(CachingMode iCachingMode);

        IFluentCommandFactory SetDefaultBehavior(CommandBehavior iBehavior);

        IFluentCommandFactory SetDefaultCommandType(CommandType iCommandType);

        IFluentCommandFactory SetDefaultContext(IDalContext iContext);

        IFluentCommandFactory SetDefaultIsolationLevel(IsolationLevel iIsolationLevel);

        IFluentCommandFactory SetDefaultKeepConnection(bool iKeepConnection);

        #endregion Public Methods
    }
}
